package com.i2works.smartluolong.web.dal.user.dao;

import com.i2works.smartluolong.utils.basecommon.BaseCommonDAO;
import com.i2works.smartluolong.utils.exception.DAOException;
import com.i2works.smartluolong.web.entity.user.UserRoleDO;
import com.i2works.smartluolong.web.entity.user.UserRoleQuery;
import com.i2works.smartluolong.web.entity.user.UserRoleResDO;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * 会员角色DAO接口
 *
 * @author Liu Yutao
 * @className UserResController
 * @email koal@vip.qq.com
 * @date 2016/2/26 14:30
 */

@Repository("userRoleDAO")
public interface IUserRoleDAO extends BaseCommonDAO<UserRoleQuery,UserRoleDO> {


    /**
     * 删除角色资源关系表
     */
    void deleteRoleRes(Integer roleId) throws DAOException;


    /**
     * 删除角色资源关系表
     */
    void deleteBatchRoleRes(List<Integer> idsList) throws DAOException;


    /**
     * 添加角色资源关系表
     */
    void saveRoleRes(UserRoleResDO userRoleResDO) throws DAOException;

    /**
     * 查询某用户的角色列表
     */
    Set<UserRoleDO> queryUserRoleList(UserRoleQuery query) throws DAOException;
}
